package parser;

import java.sql.Timestamp;

public class Record {
    int id;
    Timestamp created_at;
    boolean open;
    int comments_count;
    int changes_count;
    Timestamp closed_at;
    double min_lat;
    double min_lon;
    double max_lat;
    double max_lon;
    int uid;
    String user;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Timestamp getCreated_at() {
        return created_at;
    }

    public void setCreated_at(Timestamp created_at) {
        this.created_at = created_at;
    }

    public boolean isOpen() {
        return open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }

    public int getComments_count() {
        return comments_count;
    }

    public void setComments_count(int comments_count) {
        this.comments_count = comments_count;
    }

    public int getChanges_count() {
        return changes_count;
    }

    public void setChanges_count(int changes_count) {
        this.changes_count = changes_count;
    }

    public Timestamp getClosed_at() {
        return closed_at;
    }

    public void setClosed_at(Timestamp closed_at) {
        this.closed_at = closed_at;
    }

    public double getMin_lat() {
        return min_lat;
    }

    public void setMin_lat(double min_lat) {
        this.min_lat = min_lat;
    }

    public double getMin_lon() {
        return min_lon;
    }

    public void setMin_lon(double min_lon) {
        this.min_lon = min_lon;
    }

    public double getMax_lat() {
        return max_lat;
    }

    public void setMax_lat(double max_lat) {
        this.max_lat = max_lat;
    }

    public double getMax_lon() {
        return max_lon;
    }

    public void setMax_lon(double max_lon) {
        this.max_lon = max_lon;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getGeom(){
        return "ST_GeomFromText('POLYGON(("+this.min_lon+" "+this.min_lat+","+this.max_lon+" "+this.min_lat+","+this.max_lon+" "+this.max_lat+","+this.min_lon+" "+this.max_lat+","+this.min_lon+" "+this.min_lat+"))',4326)";
    }
}
